package com.owulia.coffee;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.owulia.coffee.commons.constant.OrderConstant;
import com.owulia.coffee.entity.mysql.Coffee;
import com.owulia.coffee.entity.mysql.Order;
import com.owulia.coffee.entity.enums.OrderState;
import com.owulia.coffee.repository.mysql.CoffeeRepository;
import com.owulia.coffee.repository.mysql.OrderRepository;
import lombok.extern.log4j.Log4j;
import org.joda.money.Money;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;
import org.springframework.transaction.annotation.Transactional;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

@SpringBootApplication
@EnableJpaRepositories
@EnableMongoRepositories(basePackages = "com.owulia.coffee.repository.mongo")
@EnableRedisRepositories(basePackages = "com.owulia.coffee.repository.redis")
@Log4j
public class CoffeeApplication{



    public static void main(String[] args) {
        SpringApplication.run(CoffeeApplication.class, args);
    }

}
